-
Notifications
You must be signed in to change notification settings - Fork 16
Feat/defer publish #2362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Feat/defer publish #2362
Conversation
| this.assetsUidMap[uid] = response.uid; | ||
| this.assetsUrlMap[url] = response.url; | ||
| // Track assets with valid publish_details for deferred publishing | ||
| if (!isEmpty(publish_details)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@netrajpatel , With this approach, we lose locale and environment context. We end up blindly publishing assets, entries, and variant entries across all locales and environments. This also ignores entry and variant entry localization scenarios.
In my opinion, we should simply move the existing publish logic into publish module. Before starting the publish process for each module, we can read from these files in the same way we currently do. This avoids the need to store the entire publish information in memory, which could otherwise lead to memory issues.
| const entriesWithPublishDetails: Set<string> = new Set(); | ||
| for (const entry of apiContent) { | ||
| if (!isEmpty(entry.publish_details)) { | ||
| const validPublishDetails = entry.publish_details.filter((pubDetail: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (this.failedVariantEntries.has(variantEntry.uid)) continue; | ||
|
|
||
| if (!isEmpty(variantEntry.publish_details)) { | ||
| const validPublishDetails = variantEntry.publish_details.filter((pd: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defer publish introduced for Asset, Entries and Variant Entries